package com.yangmao.yangapi_client_sdk;

import com.yangmao.yangapi_client_sdk.client.YangApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties("yangapi.client")
@Data
@ComponentScan
public class YangApiClientConfig {

    private String accessKey;
    private String secretKey;

    /**
     * 创建一个名为”YangApiClient“的bean
     * @return
     */
    @Bean
    public YangApiClient yangApiClient(){
       return new YangApiClient(accessKey,secretKey);
    }

}
